package com.capgemini.scaffold.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 员工表
 * @TableName user
 */
@TableName(value ="user")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {

    @ApiModelProperty(value = "主键id",required = true)
    @TableId(type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty(value = "员工账户")
    private String userAccount;

    @ApiModelProperty(value = "员工姓名")
    private String userName;

    @ApiModelProperty(value = "员工性别")
    private Integer userGender;

    @ApiModelProperty(value = "员工密码")
    private String userPassword;

    @ApiModelProperty(value = "员工手机号")
    private String userPhone;

    @ApiModelProperty(value = "员工邮箱")
    private String userEmail;

    @ApiModelProperty(value = "部门id")
    private String departmentId;

    @ApiModelProperty(value = "职位id")
    private String positionId;

    @ApiModelProperty(value = "职级id")
    private String levelId;

    @TableField(value = "project_id" ,updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "项目id")
    private Integer projectId;

    @ApiModelProperty(value = "状态id")
    private String statusId;

    @ApiModelProperty(value = "员工头像")
    private String userAvatarUrl;

    @ApiModelProperty(value = "入职时间")
    private Date userEntryTime;

    @ApiModelProperty(value = "创建时间")
    private Date userCreateTime;

    @ApiModelProperty(value = "更新时间")
    private Date userUpdateTime;

    /**
     *  0-普通用户 1-管理员
     */
    @ApiModelProperty(value = "员工角色", required = true)
    private Integer isRole;

    /**
     *  0-正常 1-删除
     */
    @ApiModelProperty(value = "逻辑删除", required = true)
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}